package com.lsa.letcode.the3.substr;

import org.junit.Assert;

import junit.framework.TestCase;

public class LongSubstringTest extends TestCase{
	public void test1() {
		Solution s = new Solution();
		Assert.assertEquals(6, s.lengthOfLongestSubstring("abcabcdabcdeabcdeffaa"));
		Assert.assertEquals(3, s.lengthOfLongestSubstring("abcabcbb"));
		Assert.assertEquals(1, s.lengthOfLongestSubstring("aaaa"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("aaabaa"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("aaaabaaa"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("abaaaa"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("aaaazaaaa"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("aaaazaaaz"));
		Assert.assertEquals(2, s.lengthOfLongestSubstring("zaaazaaaa"));
		Assert.assertEquals(3, s.lengthOfLongestSubstring("dvdf"));
		System.out.println(s.longest("eabcdafgha"));
		Assert.assertEquals(7, s.lengthOfLongestSubstring("eabcdafgha"));
	}
}
